require(['jquery', 'cookie', 'app', "lay"], function ($) {
    require(['vue'], function (Vue) {
        var dic = new Vue({
            el: ".vue-box"
            , data: {
                where: {},
                userInfo: {}
            }
            , created: function () {
                this.userInfo = JSON.parse(localStorage.getItem("userInfo"));
                this.loadPage();
            }
            , methods: {
                loadPage: function () {
                    load();
                    var toolbar = [];
                    var tool = [];
                    bspVIEW($("#authoritiesTable"), "/v1/api/user/blance/all", [
                        {type: 'radio',width: 150},
                        {type: 'numbers'},
                        {field: 'id', title: 'id', minWidth: 50, width: 120},
                        {field: 'log', title: '说明', minWidth: 50, width: 120},
                        {
                            templet: function (d) {
                                return d.users.name;
                            }, title: '用户', minWidth: 50, width: 120
                        },
                        {
                            templet: function (d) {
                                return parseFloat(parseFloat(d.after) - parseFloat(d.befor)).toFixed(5);
                            }, title: '本次操作金额', minWidth: 50, width: 120
                        },
                        {field: 'befor', title: '操作前金额', minWidth: 50, width: 120},
                        {field: 'after', title: '操作后金额', minWidth: 50, width: 120},
                        {
                            templet: function (d) {
                                return d.type.display;
                            }, title: '操作类型', minWidth: 50, width: 120
                        },
                        {
                            templet: function (d) {
                                return d.utype.display;
                            }, title: '币种', minWidth: 50, width: 120
                        },
                        {field: 'modifiedTime', title: '时间', minWidth: 50, width: 120},
                    ], {common: this.where}, toolbar, tool, function (res, curr, count) {

                    });
                },
                seachs: function () {
                    this.where = fromName($(".el-form"));
                    this.loadPage();
                },
                refer: function () {

                }
            }
        });
    })
});